package io.lkt.modules.sys.service.impl;

import io.lkt.modules.sys.entity.BOrderInfoEntity;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import io.lkt.common.utils.PageUtils;
import io.lkt.common.utils.Query;

import io.lkt.modules.sys.dao.BUserWithdrawLogDao;
import io.lkt.modules.sys.entity.BUserWithdrawLogEntity;
import io.lkt.modules.sys.service.BUserWithdrawLogService;


@Service("bUserWithdrawLogService")
public class BUserWithdrawLogServiceImpl extends ServiceImpl<BUserWithdrawLogDao, BUserWithdrawLogEntity> implements BUserWithdrawLogService {
    @Autowired
    private BUserWithdrawLogDao bUserWithdrawLogDao;
    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        IPage<BUserWithdrawLogEntity> page = this.page(
                new Query<BUserWithdrawLogEntity>().getPage(params),
                new QueryWrapper<BUserWithdrawLogEntity>()
        );

        return new PageUtils(page);
    }

    @Override
    public List<BUserWithdrawLogEntity> queryList(Map<String, Object> map) {
        return bUserWithdrawLogDao.queryList(map);
    }

    @Override
    public Integer queryTotal(Map<String, Object> map) {
        return bUserWithdrawLogDao.queryTotal(map);
    }

    @Override
    public List<BUserWithdrawLogEntity> getWithdrawByUserId(Map<String, Object> params) {
        return bUserWithdrawLogDao.getWithdrawByUserId(params);
    }

    @Override
    public int getWithdrawByUserIdTotal(Map<String, Object> params) {
        return bUserWithdrawLogDao.getWithdrawByUserIdTotal(params);
    }

    @Override
    public BUserWithdrawLogEntity getLatestWithdrawal(Map<String, Object> map) {
        return bUserWithdrawLogDao.getLatestWithdrawal(map);
    }

}
